<template>
  <div class="navbar">
    <van-search
      shape="round"
      v-model="searchValue"
      placeholder="请输入搜索关键词"
    />
  </div>
  <div class="home-container">
    <van-tabs v-model:active="active" color="#1989fa">
      <van-tab to="/" title="系统推荐">
        <router-view v-slot="{ Component }">
          <keep-alive>
            <component :is="Component" v-if="$route.meta.keepAlive" />
          </keep-alive>
          <component :is="Component" v-if="!$route.meta.keepAlive" />
        </router-view>
      </van-tab>
      <van-tab title="标签 2">
        <div class="saoyisao">
          <van-icon @click="qrcodeScan"  name="qr" size="80px" />
        </div>
      </van-tab>
      <van-tab title="标签 3">内容 3</van-tab>
      <van-tab title="标签 4">内容 4</van-tab>
    </van-tabs>
  </div>
</template>

<script setup>
const searchValue = ''
const active = 0
</script>

<script>
export default {
  name:"Home",
  methods:{
    qrcodeScan(){
      this.$router.push('/qrscan')
    }
  }
}
</script>
<style lang="less">
.saoyisao{
  width: 100%;
  height:700px;
  display: flex;
  justify-content: center;
  align-items:center;
}
</style>
